finding the number of diagonals of a polygon